<include file='Index/header'/>
<script language="javascript" type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>  
<style>
    hr{
     height:-10px;   
     margin: 0px 0;   
        
    }   
    
    </style>
<include file='Index/left'/>

    
   
    

    
    <div class="content">
        
        <div class="header">
          

            <h1 class="page-title">林州市红旗渠干部学院</h1>
        </div>
        
        <ul class="breadcrumb">
            <li><a href="Index.html">首页</a> <span class="divider">/</span></li>
            <li class="active"></li>
        </ul>
        <div class="well well-sm" >
                    <form id="cx" name="cx" method="post">
                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <lable>日期：</lable>
                        <input type="text" name="start_time" onClick="WdatePicker()" placeholder="" style="width:80px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <lable>结束时间：</lable>
                        <input type="text" name="end_time" onClick="WdatePicker()" placeholder="" style="width:80px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            
                        
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <button  type="button" class="btn btn-primary" onclick="submit()">查询</button>
                    </form>      
                    
                     
                </div>     
          <div style="margin-left:50px;text-align:center">
       <div class="tb"> 
<table width="90%" border="1">
  <tr>
    <td width="115" align="center"  bgcolor="#999999"><h3>日期</h3></td>
    <td width="56" align="center"  bgcolor="#999999"><h3>午别</h3></td>
    <td width="192" align="center"  bgcolor="#999999"><h3>课程/班次</h3></td>
    <td width="192" align="center"  bgcolor="#999999"><h3>教室</h3></td>
    <td width="140" align="center"  bgcolor="#999999"><h3>日期</h3></td>
     <td width="140" align="center"  bgcolor="#999999"><h3>结束时间</h3></td>
  </tr>
 
       <volist name='sq' id='vo' key='k'>   

           <tr>
    <td rowspan="2"  align="center"  ><p>{$key}</p> <p>
        <switch name="key|strtotime|date='w',###" >
<case value="1">(星期一)</case>
<case value="2">(星期二)</case>
<case value="3">(星期三)</case>
<case value="4">(星期四)</case>
<case value="5">(星期五)</case>
<case value="6">(星期六)</case>
<case value="0">(星期日)</case>
<default />数据错误
</switch>
        
        </p></td>
    <td height="35" align="center"  >上午</td>
    <td align="center"  ><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '1') or ($vp['is_am2'] eq '1')"><a href='javascript:void(0)' onclick="kcshow('{$vp.coursename}')">{$vp['coursename']}</a>&nbsp;/&nbsp;<a href='javascript:void(0)' onclick="bcshow('{$vp.schename}')">{$vp['schename']}</a><hr /></if></p></volist></td>
    <td  align="center"  height="35"><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '1') or ($vp['is_am2'] eq '1')">
       <select name="class" id="class" onchange="saves({$vp['id']},this.value);">
           <if condition="$vp['class'] eq ''">
    <option value="0" selected="selected">请选择教室</option>
 <else />
     <option value="{$vp['class']}" selected="selected">{$vp['class']}</option>
           </if>
        <volist name='class' id='vcl'>   
 <option value="{$vcl.classname}">{$vcl.classname}</option>
 
        </volist>
</select>     
           <hr /></if></p></volist></td> 
    <td align="center"  ><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '1') or ($vp['is_am2'] eq '1')">{$vp['start_time']}<hr /></if></p></volist></td>
     <td align="center"  ><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '1') or ($vp['is_am2'] eq '1')">{$vp['end_time']}<hr /></if></p></volist></td>
  </tr>
  <tr>
    <td align="center"   height="38">下午</td>
    <td align="center"  ><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '2') or ($vp['is_am2'] eq '2')"><a href='javascript:void(0)' onclick="kcshow('{$vp.coursename}')">{$vp['coursename']}</a>&nbsp;/&nbsp;<a href='javascript:void(0)' onclick="bcshow('{$vp.schename}')">{$vp['schename']}</a><hr /></if></p></volist></td>
    <td  align="center"  height="35"><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '2') or ($vp['is_am2'] eq '2')">       <select name="class" id="class" onchange="saves({$vp['id']},this.value);">
           <if condition="$vp['class'] eq ''">
    <option value="0" selected="selected">请选择教室</option>
 <else />
     <option value="{$vp['class']}" selected="selected">{$vp['class']}</option>
           </if>
        <volist name='class' id='vcl'>   
 <option value="{$vcl.classname}">{$vcl.classname}</option>
 
        </volist>
</select>  <hr /></if></p></volist></td> 
    <td align="center"  ><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '2') or ($vp['is_am2'] eq '2')">{$vp['start_time']}<hr /></if></p></volist></td>
     <td align="center"  ><volist name='vo' id='vp'><p><if condition="($vp['is_am'] eq '2') or ($vp['is_am2'] eq '2')">{$vp['end_time']}<hr /></if></p></volist></td>
  </tr>


      </volist>
</table>
       </div>
              <br/>
              <if condition="$sd neq ''">
              <div>  <a href="{:U('Index/index',array('fs'=>'up','sd'=>$sd))}" ><button type="button" class="btn btn-default btn-lg">上一周</button></a>&nbsp;&nbsp;| &nbsp;&nbsp;<a href="{:U('Index/index',array('fs'=>'now'))}" ><button type="button" class="btn btn-default btn-lg">本周</button></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{:U('Index/index',array('fs'=>'down','sd'=>$sd))}" ><button type="button" class="btn btn-default btn-lg">下一周</button></a></div>
              </if>
          </div>
        
        <div class="container-fluid">
            <div class="row-fluid">
                    

<div class="row-fluid">

    <div class="alert alert-info">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <h4>Ver:</h4> 1.0.0
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
              课程信息
            </h4>
         </div>
          <div>
              <div id='listsp'></div>
      </div>
      </div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>  
                 <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
           
            </h4>
         </div>
          <div>
              <div id='listsp2'></div>
      </div>
      </div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>          
    <script type="text/javascript">  
  function saves(id,value){
    $.ajax({
                type: "POST",
                url: "__CONTROLLER__/saveclass",
           
                cache: false,
                data: {
                  id:id,
                  value:value
                    
                },
         
                    success: function(data) {
window.location.reload();
   }

        });
      
      
  }      
  function kcshow(bcbh){
     $.ajax({
                type: "POST",
                url: "__CONTROLLER__/kcshow",
           
                cache: false,
                data: {
                  kcname:bcbh  
                    
                },
         
                    success: function(data) {
               
      $('#listsp').html(data);                     
  $('#myModal').modal('show');
  $('#myModal').modal().css({
    width: '1000px',
    height:'500px',
    'margin-left': function () {
       return -($(this).width() / 2);
   }
});
                       }
                    
        
        
        
        });

   
              }  
               function bcshow(bcbh){
     $.ajax({
                type: "POST",
                url: "__CONTROLLER__/bcshow",
           
                cache: false,
                data: {
                  bcmc:bcbh  
                    
                },
         
                    success: function(data) {
               
     $('#listsp2').html(data);               
  $('#myModal2').modal('show');
  $('#myModal2').modal().css({
    width: '1000px',
   height:'500px',
    'margin-left': function () {
       return -($(this).width() / 2);
   }
});
                       }
                    
        
        
        
        })

   
              }  
</script>

<include file='Index/footer'/>
 